﻿<%@ Page Title="" Language="C#" MasterPageFile="~/ANMCMaster.Master" AutoEventWireup="true" CodeBehind="SundaySchoolResource.aspx.cs" Inherits="AllNations.SundaySchoolResource" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ANHeaderContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ANPageHeader" runat="server">
    <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/education_main.png" />
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ANBodyContent" runat="server">
    <div class="leftnav">
        <div style="margin: 11px 0px 25px 0px;"><asp:Image ID="Image2" runat="server" ImageUrl="~/Images/sectionTitleEducation.png" /></div>
        <telerik:RadMenu ID="radMenuLeftNav" runat="server" EnableEmbeddedSkins="false" 
            Skin="ANMCLeftNav">
            <Items>
                <telerik:RadMenuItem Text="어린이부" Value="SundaySchool" NavigateUrl="~/Education"></telerik:RadMenuItem>
                <telerik:RadMenuItem Text="중고등부" Value="YouthGroup" NavigateUrl="~/Education?YouthGroup"></telerik:RadMenuItem>
                <telerik:RadMenuItem Text="AWANA" Value="AWANA" NavigateUrl="~/Education?AWANA"></telerik:RadMenuItem>
                <telerik:RadMenuItem Text="청년부" Value="YoungAdults" NavigateUrl="~/Education?YoungAdults"></telerik:RadMenuItem>
                <telerik:RadMenuItem Text="장년 6 단계 양육" Value="Adults" NavigateUrl="~/Education?Adults"></telerik:RadMenuItem>
                <telerik:RadMenuItem Text="진리를 찾아서" Value="SeekTruth" NavigateUrl="~/FileShare/SeekingTruth"></telerik:RadMenuItem>
                <telerik:RadMenuItem Text="어린이부 자료실" Value="SundaySchoolResources" Selected="true"></telerik:RadMenuItem>
            </Items>
        </telerik:RadMenu>
    </div>
    <div class="rightcontentarea">
        <div id="contentBoxHolder">
            <div class="ContentTitleBar">
                <asp:Image ID="Image11" runat="server" ImageUrl="~/Images/titleSundaySchool.png" />
            </div>
            <telerik:RadFileExplorer ID="fileExplorerSundaySchoolResources" runat="server" Width="696" ExplorerMode="FileTree"
                OnClientFileOpen="OnExplorerFileOpen"
                Skin="Metro" Configuration-ViewPaths="~/Resources/SundaySchoolResources/Root" EnableOpenFile="true" RegisterWithScriptManager="true">
            </telerik:RadFileExplorer>
            <script type="text/javascript">
                var videoUrl = "";
                function OnExplorerFileOpen(oExplorer, args) {
                    videoUrl = "";
                    if (args.get_item().get_name().toLowerCase().endsWith(".pdf")) {
                        setTimeout(function () {
                            var oWindowManager = oExplorer.get_windowManager();
                            var previewWinow = oWindowManager.getActiveWindow(); // Gets the current active widow.
                            previewWinow.maximize(); //alternatively, maximize it. You can use its entire API
                        }, 100);   // Some timeout is required in order to allow the window to become active
                    }
                    else if (args.get_item().get_name().toLowerCase().endsWith(".flv")) {
                        videoUrl = args.get_item().get_path();
                        //cancel the default behavior
                        args.set_cancel(true);
                        //open new RadWindow
                        var oWnd = radopen("/FlashVideo?" + args.get_item().get_path(), "RadWindow1");
                        //set size to the newly opened RadWindow
                        oWnd.setSize(600, 400);
                        //if you want to open the PDF file in a new browser window
                        //you can use the following code
                        //window.open(args.get_item().get_path());
                    }
                }
            </script>
        </div>
        <div style="clear: both;"></div>
    </div>
    <div style="clear: both;"></div>
</asp:Content>
